package java_thinking.unit_10._10_9;

/**
 * @Description :
 * @author: cww
 * @DateTime: 2019-03-16 15:05
 */

public class E26 {

}

class Out{

    class Inner1{
        String s = "1";
        Inner1(String s){
            this.s = s;
            System.out.println("Inner1.constructor s = "+s);
        }
        Inner1(){
            System.out.println("Inner1.constructor "+s);
        }
        public void f(){
            System.out.println("Inner1.f()");
        }
    }
}

class Out2{
    class Inner2 extends Out.Inner1{
        //无法编译一下注释代码
//        public Innner2(String s){
//            super(s);
//        }

        Inner2(Out o,String s){
            o.super(s);
        }
        @Override
        public void f(){
            System.out.println("Inner2.f");
            super.f();
        }
    }

    public static void main(String[] args) {
        Out out = new Out();
        Out2 out2 = new Out2();
        Inner2 inner2 = out2.new Inner2(out,"333");
        inner2.f();
    }
}
